package com.sq.partner.manager.service;

import java.math.BigDecimal;
import java.util.List;

import javax.servlet.http.HttpSession;

import com.sq.partner.manager.mybatis.model.ActirationCardDifinition;
import com.sq.partner.manager.mybatis.model.CoreDept;
import com.sq.partner.manager.mybatis.model.NlifePlan;
import com.sq.partner.manager.mybatis.model.Salesarea;
import com.sq.partner.manager.util.Page;

public interface ActirationCardService {

	/**
	 * 根据条件查询卡模板
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public Page<ActirationCardDifinition> queryActirationCardDifinition(Page<ActirationCardDifinition> page) throws Exception;
	/**
	 * 根据卡模板id查询卡模板信息
	 * @param templatid
	 * @return
	 * @throws Exception
	 */
	public ActirationCardDifinition queryCardTemplate(String templatid) throws Exception;
	/**
	 * 新增激活卡模板信息
	 * @param carinfo
	 * @return
	 * @throws Exception
	 */
	public boolean insertCardTemplate(HttpSession session,ActirationCardDifinition carinfo) throws Exception;
	/**
	 * 修改激活卡模板信息
	 * @param carinfo
	 * @return
	 * @throws Exception
	 */
	public boolean updateCardTemplate(ActirationCardDifinition carinfo) throws Exception;
	/**
	 * 删除激活卡模板信息
	 * @param templatid
	 * @return
	 * @throws Exception
	 */
	public boolean deleteCardTemplate(String templatid) throws Exception;
	/**
	 * 修改启用停用标志
	 * @param templatid
	 * @return
	 * @throws Exception
	 */
	public boolean chageYN(String templatid,String onoffflag) throws Exception;
	/**
	 * 绑定销售区域
	 * @param sales
	 * @return
	 * @throws Exception
	 */
	public boolean boundArea(String salesId,List<String> salesList) throws Exception;
	/**
	 * 查询销售区域
	 * @param sales
	 * @return
	 * @throws Exception
	 */
	public List<Salesarea> querybound(Salesarea sales) throws Exception;
	/**
	 * 删除销售区域
	 * @param sales
	 * @return
	 * @throws Exception
	 */
	public boolean deletebound(Salesarea sales) throws Exception;
	/**
	 * 查询分公司销售区域绑定
	 * @return
	 * @throws Exception
	 */
	public List<CoreDept> queryComcode() throws Exception;
	/**
	 * 查询是否存在同名卡定义名称
	 * @param name
	 * @return
	 * @throws Exception
	 */
	public Integer queryDefineNameCount(String name) throws Exception;
	
	/**
	 * 分页条件查询方案
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public Page<NlifePlan> queryNlifePlanPageByCriteria(Page<NlifePlan> page) throws Exception;
	/**
	 * 根据卡模板信息查询卡模板
	 * @param cardInfo
	 * @return
	 * @throws Exception
	 */
	public ActirationCardDifinition queryCardbyInfo(ActirationCardDifinition cardInfo) throws Exception;
	/**
	 * 查询方案下产品的全险种固定总保费
	 * @param planNo 方案号
	 * @return
	 * @throws Exception
	 */
	public BigDecimal queryAllpremium(String planNo) throws Exception;
}
